<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 200px;
            height: 40px;
            border: 1px solid #000;
            background-image: linear-gradient(45deg,
            green 0%,green 25%,
            blue 25%,blue  50%,
            green 50%,green 75%,
            blue  75%,blue  100%
            );
            background-size: 40px 40px;
            /* background-repeat: no-repeat; */
            background-position: 0px 0px;
            animation: abc 200s linear infinite;
            transform:rotate(-90deg) translateX(-100px);
        }
        /* 定义动画 */
        @keyframes abc{
            form{
                background-position: 0px 0px;
            }
            to{
                background-position: 10000px 0px;
            }
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>